package com.meilai.project.entity.finance.supplier;

import com.baomidou.mybatisplus.annotation.TableName;
import com.meilai.project.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("supplier")
public class Supplier extends BaseEntity {

    @NotNull(message = "供应商名称不能为空")
    @Size(min=1, max=50, message = "最多允许输入50个字符串")
    @ApiModelProperty(value = "供应商名称")
    private String name;

    @ApiModelProperty(value = "结算周期，字典id")
    private Long pay_cycle_id;

    @ApiModelProperty(value = "送货方式，字典id")
    private Long delivery_method_id;

    @ApiModelProperty(value = "地址")
    @Size(min=1, max=250, message = "最多允许输入250个字符串")
    private String address;
}
